﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Workflow2211A.Domain.Entities
{
    /// <summary>
    /// 用户表
    /// </summary>
    [Table("User")]
    public class UserModel:BaseEntity
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [MaxLength(100),Required]
        public string UserName { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        [MaxLength(100),Required]
        public string UserPass { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [MaxLength(100), Required]
        public string Email { get; set; }
        /// <summary>
        /// 手机号
        /// </summary>
        [MaxLength(100), Required]
        public string Phone { get; set; }
        /// <summary>
        /// 真实姓名
        /// </summary>
        [MaxLength(100), Required]
        public string NickName { get; set; }
        /// <summary>
        /// 角色ID <see cref="RoleModel"/>
        /// </summary>
        [Required]
        public long RoleId { get; set; }
        /// <summary>
        /// 导航属性
        /// </summary>

        public RoleModel Role { get; set; }

    }
}
